{%include file="m.index.header.tpl.php"%}
<!--主体部分-->
<div class="container" style="margin-top:70px;">
	<div class="row" style="margin-top:10px;">
		<form action="" method="get">
			<div class="col-sm-12 distance" >
				<div class="form-group">
					<div class="col-sm-10">
						<div class="form-group">
							<label for="exampleInputEmail1">报修人:</label>
							<select class="form-control" name="main_name">
								<option value="">全部</option>
								{%foreach from=$main_names key=key item=value%}
								<option value="{%$value.user_name%}"{%if $value.user_name == $main_name%}selected{%/if%} >{%$value.user_name%}</option>
								{%/foreach%}
							</select>
						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-12 distance" >
				<div class="form-group">
					<div class="col-sm-10">
						<div class="form-group">
							<label for="exampleInputEmail1">维修单位:</label>
							<select class="form-control" name="maince_com">
								<option value="" >全部</option>
								{%foreach from=$maince_lists key=key item=value%}
								<option value="{%$value.maince_com%}"{%if $value.maince_com == $maince_com%}selected{%/if%}>{%$value.maince_com%}</option>
								{%/foreach%}

							</select>
						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-12 distance" >
				<div class="form-group">
					<div class="col-sm-10">
						<div class="form-group">
							<label for="exampleInputEmail1">结算类型:</label>
							<select class="form-control" name="is_show">
								<option value="" >全部</option>
								{%foreach from=$is_shows key=key item=value%}
								<option value="{%$key%}"{%if $key==$is_show%}selected{%/if%}>{%$value%}</option>
								{%/foreach%}
							</select>
						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-12 distance" >
				<div class="form-group">
					<div class="col-sm-10">
						<div class="form-group">
							<label for="exampleInputEmail1">开始日期:</label>
							<input type="text" class="form-control" value="{%$from%}" id="datepicker" name="from">

						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-12 distance" >
				<div class="form-group">
					<div class="col-sm-10">
						<div class="form-group">
							<label for="exampleInputEmail1">结束日期:</label>
							<input type="text" class="form-control" value="{%$to%}" id="datepicker2" name="to">

						</div>
					</div>
				</div>
			</div>
			<div class="col-xs-12 distance text-center" >
				<input type="hidden" name="a" value="main.demandlist">
				<button type="submit" class="btn btn-success" style="width:80%">搜索</button>
			</div>
		</form>
	</div>
	<div class="row" style="margin-top:15px;margin-left:1px; margin-right:1px;">
		{%foreach from=$main_lists key=key item=value%}
		<table class="table table-striped table-bordered text-center"  id="middles">
			<tr>
				<td>报修人</td>
				<td>{%$value.user_name%}</td>
			</tr>
			<tr>
				<td>完成时间</td>
				<td>{%$value.maintain_time%}</td>
			</tr>
			<tr>
				<td>维修单位</td>
				<td>{%$value.maince_com%}</td>
			</tr>
			<tr>
				<td>维修内容</td>
				<td>{%$value.main_content%}</td>
			</tr>
			<tr>
				<td>结算类型</td>
				<td>{%$value.is_show%}</td>
			</tr>
			<tr>
				<td>备注</td>
				<td>{%$value.main_remark%}</td>
			</tr>
			<tr>
				<td>操作</td>
				<td ><a href="index.php?a=main.maintaindetails&main_id={%$value.main_id%}&is_show=1&main_type=chaxun" class="btn btn-success btn-sm" title="查看">查看</a></td>
			</tr>
		</table>
		{%/foreach%}
	</div>
</div>
<!--container  end-->
<!--主体部分  end-->
<!--底部-->
{%include file="m.index.footer.tpl.php"%}
<!--container  end-->

<!--底部end-->
<script src="mstatic/js/jquery.min.js" type="text/javascript"></script>
<script src="mstatic/js/bootstrap.min.js"  type="text/javascript"></script>
<script src="mstatic/js/jquery-ui.js"  type="text/javascript"></script><!--日历-->
<!--日历-->
<script>
	$(function() {
		$( "#datepicker" ).datepicker({

			changeMonth: true,
			changeYear: true

		});

		$( "#datepicker2" ).datepicker({

			changeMonth: true,
			changeYear: true

		});
	});
</script>
</body>
</html>
